/*

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

*/
module derelict.ode.ode;

public
{
    import derelict.ode.types;
    import derelict.ode.functions;
}

private
{
    import derelict.util.loader;
    import derelict.util.system;

    static if(Derelict_OS_Windows)
    {
        version(DerelictODE_DoublePrecision)
            enum libNames = "ode_double.dll,ode_doubled.dll,ode.dll";
        else
            enum libNames = "ode_single.dll,ode_singled.dll,ode.dll";
    }
    else static if(Derelict_OS_Mac)
    {
        version(DerelictODE_DoublePrecision)
            enum libNames = "libode_double.dylib,libode_doubled.dylib,libode.dylib";
        else
            enum libNames = "libode_single.dylib,libode_singled.dylib,libode.dylib";
    }
    else static if(Derelict_OS_Posix)
    {
        version(DerelictODE_DoublePrecision)
            enum libNames = "libode_double.so,libode_doubled.so,libode.so,libode.so.3";
        else
            enum libNames = "libode_single.so,libode_singled.so,libode.so,libode.so.3";
    }
    else
        static assert(0, "Need to implement ODE libNames for this operating system.");
}

class DerelictODELoader : SharedLibLoader
{
    protected
    {
        override void loadSymbols()
        {
            bindFunc(cast(void**)&dGetConfiguration, "dGetConfiguration");
            bindFunc(cast(void**)&dCheckConfiguration, "dCheckConfiguration");
            bindFunc(cast(void**)&dGeomDestroy, "dGeomDestroy");
            bindFunc(cast(void**)&dGeomSetData, "dGeomSetData");
            bindFunc(cast(void**)&dGeomGetData, "dGeomGetData");
            bindFunc(cast(void**)&dGeomSetBody, "dGeomSetBody");
            bindFunc(cast(void**)&dGeomGetBody, "dGeomGetBody");
            bindFunc(cast(void**)&dGeomSetPosition, "dGeomSetPosition");
            bindFunc(cast(void**)&dGeomSetRotation, "dGeomSetRotation");
            bindFunc(cast(void**)&dGeomSetQuaternion, "dGeomSetQuaternion");
            bindFunc(cast(void**)&dGeomGetPosition, "dGeomGetPosition");
            bindFunc(cast(void**)&dGeomCopyPosition, "dGeomCopyPosition");
            bindFunc(cast(void**)&dGeomGetRotation, "dGeomGetRotation");
            bindFunc(cast(void**)&dGeomCopyRotation, "dGeomCopyRotation");
            bindFunc(cast(void**)&dGeomGetQuaternion, "dGeomGetQuaternion");
            bindFunc(cast(void**)&dGeomGetAABB, "dGeomGetAABB");
            bindFunc(cast(void**)&dGeomIsSpace, "dGeomIsSpace");
            bindFunc(cast(void**)&dGeomGetSpace, "dGeomGetSpace");
            bindFunc(cast(void**)&dGeomGetClass, "dGeomGetClass");
            bindFunc(cast(void**)&dGeomSetCategoryBits, "dGeomSetCategoryBits");
            bindFunc(cast(void**)&dGeomSetCollideBits, "dGeomSetCollideBits");
            bindFunc(cast(void**)&dGeomGetCategoryBits, "dGeomGetCategoryBits");
            bindFunc(cast(void**)&dGeomGetCollideBits, "dGeomGetCollideBits");
            bindFunc(cast(void**)&dGeomEnable, "dGeomEnable");
            bindFunc(cast(void**)&dGeomDisable, "dGeomDisable");
            bindFunc(cast(void**)&dGeomIsEnabled, "dGeomIsEnabled");
            bindFunc(cast(void**)&dGeomLowLevelControl, "dGeomLowLevelControl");
            bindFunc(cast(void**)&dGeomGetRelPointPos, "dGeomGetRelPointPos");
            bindFunc(cast(void**)&dGeomGetPosRelPoint, "dGeomGetPosRelPoint");
            bindFunc(cast(void**)&dGeomVectorToWorld, "dGeomVectorToWorld");
            bindFunc(cast(void**)&dGeomVectorFromWorld, "dGeomVectorFromWorld");
            bindFunc(cast(void**)&dGeomSetOffsetPosition, "dGeomSetOffsetPosition");
            bindFunc(cast(void**)&dGeomSetOffsetRotation, "dGeomSetOffsetRotation");
            bindFunc(cast(void**)&dGeomSetOffsetQuaternion, "dGeomSetOffsetQuaternion");
            bindFunc(cast(void**)&dGeomSetOffsetWorldPosition, "dGeomSetOffsetWorldPosition");
            bindFunc(cast(void**)&dGeomSetOffsetWorldRotation, "dGeomSetOffsetWorldRotation");
            bindFunc(cast(void**)&dGeomSetOffsetWorldQuaternion, "dGeomSetOffsetWorldQuaternion");
            bindFunc(cast(void**)&dGeomClearOffset, "dGeomClearOffset");
            bindFunc(cast(void**)&dGeomIsOffset, "dGeomIsOffset");
            bindFunc(cast(void**)&dGeomGetOffsetPosition, "dGeomGetOffsetPosition");
            bindFunc(cast(void**)&dGeomCopyOffsetPosition, "dGeomCopyOffsetPosition");
            bindFunc(cast(void**)&dGeomGetOffsetRotation, "dGeomGetOffsetRotation");
            bindFunc(cast(void**)&dGeomGetOffsetQuaternion, "dGeomGetOffsetQuaternion");
            bindFunc(cast(void**)&dCollide, "dCollide");
            bindFunc(cast(void**)&dSpaceCollide, "dSpaceCollide");
            bindFunc(cast(void**)&dSpaceCollide2, "dSpaceCollide2");
            bindFunc(cast(void**)&dCreateSphere, "dCreateSphere");
            bindFunc(cast(void**)&dGeomSphereSetRadius, "dGeomSphereSetRadius");
            bindFunc(cast(void**)&dGeomSphereGetRadius, "dGeomSphereGetRadius");
            bindFunc(cast(void**)&dGeomSpherePointDepth, "dGeomSpherePointDepth");
            bindFunc(cast(void**)&dCreateConvex, "dCreateConvex");
            bindFunc(cast(void**)&dGeomSetConvex, "dGeomSetConvex");
            bindFunc(cast(void**)&dCreateBox, "dCreateBox");
            bindFunc(cast(void**)&dGeomBoxSetLengths, "dGeomBoxSetLengths");
            bindFunc(cast(void**)&dGeomBoxGetLengths, "dGeomBoxGetLengths");
            bindFunc(cast(void**)&dGeomBoxPointDepth, "dGeomBoxPointDepth");
            bindFunc(cast(void**)&dCreatePlane, "dCreatePlane");
            bindFunc(cast(void**)&dGeomPlaneSetParams, "dGeomPlaneSetParams");
            bindFunc(cast(void**)&dGeomPlaneGetParams, "dGeomPlaneGetParams");
            bindFunc(cast(void**)&dGeomPlanePointDepth, "dGeomPlanePointDepth");
            bindFunc(cast(void**)&dCreateCapsule, "dCreateCapsule");
            bindFunc(cast(void**)&dGeomCapsuleSetParams, "dGeomCapsuleSetParams");
            bindFunc(cast(void**)&dGeomCapsuleGetParams, "dGeomCapsuleGetParams");
            bindFunc(cast(void**)&dGeomCapsulePointDepth, "dGeomCapsulePointDepth");
            bindFunc(cast(void**)&dCreateCylinder, "dCreateCylinder");
            bindFunc(cast(void**)&dGeomCylinderSetParams, "dGeomCylinderSetParams");
            bindFunc(cast(void**)&dGeomCylinderGetParams, "dGeomCylinderGetParams");
            bindFunc(cast(void**)&dCreateRay, "dCreateRay");
            bindFunc(cast(void**)&dGeomRaySetLength, "dGeomRaySetLength");
            bindFunc(cast(void**)&dGeomRayGetLength, "dGeomRayGetLength");
            bindFunc(cast(void**)&dGeomRaySet, "dGeomRaySet");
            bindFunc(cast(void**)&dGeomRayGet, "dGeomRayGet");
            bindFunc(cast(void**)&dGeomRaySetParams, "dGeomRaySetParams");
            bindFunc(cast(void**)&dGeomRayGetParams, "dGeomRayGetParams");
            bindFunc(cast(void**)&dGeomRaySetClosestHit, "dGeomRaySetClosestHit");
            bindFunc(cast(void**)&dGeomRayGetClosestHit, "dGeomRayGetClosestHit");
            bindFunc(cast(void**)&dCreateGeomTransform, "dCreateGeomTransform");
            bindFunc(cast(void**)&dGeomTransformSetGeom, "dGeomTransformSetGeom");
            bindFunc(cast(void**)&dGeomTransformGetGeom, "dGeomTransformGetGeom");
            bindFunc(cast(void**)&dGeomTransformSetCleanup, "dGeomTransformSetCleanup");
            bindFunc(cast(void**)&dGeomTransformGetCleanup, "dGeomTransformGetCleanup");
            bindFunc(cast(void**)&dGeomTransformSetInfo, "dGeomTransformSetInfo");
            bindFunc(cast(void**)&dGeomTransformGetInfo, "dGeomTransformGetInfo");
            bindFunc(cast(void**)&dCreateHeightfield, "dCreateHeightfield");
            bindFunc(cast(void**)&dGeomHeightfieldDataCreate, "dGeomHeightfieldDataCreate");
            bindFunc(cast(void**)&dGeomHeightfieldDataDestroy, "dGeomHeightfieldDataDestroy");
            bindFunc(cast(void**)&dGeomHeightfieldDataBuildCallback, "dGeomHeightfieldDataBuildCallback");
            bindFunc(cast(void**)&dGeomHeightfieldDataBuildByte, "dGeomHeightfieldDataBuildByte");
            bindFunc(cast(void**)&dGeomHeightfieldDataBuildShort, "dGeomHeightfieldDataBuildShort");
            bindFunc(cast(void**)&dGeomHeightfieldDataBuildSingle, "dGeomHeightfieldDataBuildSingle");
            bindFunc(cast(void**)&dGeomHeightfieldDataBuildDouble, "dGeomHeightfieldDataBuildDouble");
            bindFunc(cast(void**)&dGeomHeightfieldDataSetBounds, "dGeomHeightfieldDataSetBounds");
            bindFunc(cast(void**)&dGeomHeightfieldSetHeightfieldData, "dGeomHeightfieldSetHeightfieldData");
            bindFunc(cast(void**)&dGeomHeightfieldGetHeightfieldData, "dGeomHeightfieldGetHeightfieldData");
            bindFunc(cast(void**)&dClosestLineSegmentPoints, "dClosestLineSegmentPoints");
            bindFunc(cast(void**)&dBoxTouchesBox, "dBoxTouchesBox");
            bindFunc(cast(void**)&dBoxBox, "dBoxBox");
            bindFunc(cast(void**)&dInfiniteAABB, "dInfiniteAABB");
            bindFunc(cast(void**)&dCreateGeomClass, "dCreateGeomClass");
            bindFunc(cast(void**)&dGeomGetClassData, "dGeomGetClassData");
            bindFunc(cast(void**)&dCreateGeom, "dCreateGeom");
            bindFunc(cast(void**)&dSetColliderOverride, "dSetColliderOverride");

            // collision_space.h
            bindFunc(cast(void**)&dSimpleSpaceCreate, "dSimpleSpaceCreate");
            bindFunc(cast(void**)&dHashSpaceCreate, "dHashSpaceCreate");
            bindFunc(cast(void**)&dQuadTreeSpaceCreate, "dQuadTreeSpaceCreate");
            bindFunc(cast(void**)&dSweepAndPruneSpaceCreate, "dSweepAndPruneSpaceCreate");
            bindFunc(cast(void**)&dSpaceDestroy, "dSpaceDestroy");
            bindFunc(cast(void**)&dHashSpaceSetLevels, "dHashSpaceSetLevels");
            bindFunc(cast(void**)&dHashSpaceGetLevels, "dHashSpaceGetLevels");
            bindFunc(cast(void**)&dSpaceSetCleanup, "dSpaceSetCleanup");
            bindFunc(cast(void**)&dSpaceGetCleanup, "dSpaceGetCleanup");
            bindFunc(cast(void**)&dSpaceSetSublevel, "dSpaceSetSublevel");
            bindFunc(cast(void**)&dSpaceGetSublevel, "dSpaceGetSublevel");
            bindFunc(cast(void**)&dSpaceSetManualCleanup, "dSpaceSetManualCleanup");
            bindFunc(cast(void**)&dSpaceGetManualCleanup, "dSpaceGetManualCleanup");
            bindFunc(cast(void**)&dSpaceAdd, "dSpaceAdd");
            bindFunc(cast(void**)&dSpaceRemove, "dSpaceRemove");
            bindFunc(cast(void**)&dSpaceQuery, "dSpaceQuery");
            bindFunc(cast(void**)&dSpaceClean, "dSpaceClean");
            bindFunc(cast(void**)&dSpaceGetNumGeoms, "dSpaceGetNumGeoms");
            bindFunc(cast(void**)&dSpaceGetGeom, "dSpaceGetGeom");
            bindFunc(cast(void**)&dSpaceGetClass, "dSpaceGetClass");

            // collision_trimesh.h
            bindFunc(cast(void**)&dGeomTriMeshDataCreate, "dGeomTriMeshDataCreate");
            bindFunc(cast(void**)&dGeomTriMeshDataDestroy, "dGeomTriMeshDataDestroy");
            bindFunc(cast(void**)&dGeomTriMeshDataSet, "dGeomTriMeshDataSet");
            bindFunc(cast(void**)&dGeomTriMeshDataGet, "dGeomTriMeshDataGet");
            bindFunc(cast(void**)&dGeomTriMeshSetLastTransform, "dGeomTriMeshSetLastTransform");
            bindFunc(cast(void**)&dGeomTriMeshGetLastTransform, "dGeomTriMeshGetLastTransform");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildSingle, "dGeomTriMeshDataBuildSingle");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildSingle1, "dGeomTriMeshDataBuildSingle1");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildDouble, "dGeomTriMeshDataBuildDouble");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildDouble1, "dGeomTriMeshDataBuildDouble1");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildSimple, "dGeomTriMeshDataBuildSimple");
            bindFunc(cast(void**)&dGeomTriMeshDataBuildSimple1, "dGeomTriMeshDataBuildSimple1");
            bindFunc(cast(void**)&dGeomTriMeshDataPreprocess, "dGeomTriMeshDataPreprocess");
            bindFunc(cast(void**)&dGeomTriMeshDataGetBuffer, "dGeomTriMeshDataGetBuffer");
            bindFunc(cast(void**)&dGeomTriMeshDataSetBuffer, "dGeomTriMeshDataSetBuffer");
            bindFunc(cast(void**)&dGeomTriMeshSetCallback, "dGeomTriMeshSetCallback");
            bindFunc(cast(void**)&dGeomTriMeshGetCallback, "dGeomTriMeshGetCallback");
            bindFunc(cast(void**)&dGeomTriMeshSetArrayCallback, "dGeomTriMeshSetArrayCallback");
            bindFunc(cast(void**)&dGeomTriMeshGetArrayCallback, "dGeomTriMeshGetArrayCallback");
            bindFunc(cast(void**)&dGeomTriMeshSetRayCallback, "dGeomTriMeshSetRayCallback");
            bindFunc(cast(void**)&dGeomTriMeshGetRayCallback, "dGeomTriMeshGetRayCallback");
            bindFunc(cast(void**)&dGeomTriMeshSetTriMergeCallback, "dGeomTriMeshSetTriMergeCallback");
            bindFunc(cast(void**)&dGeomTriMeshGetTriMergeCallback, "dGeomTriMeshGetTriMergeCallback");
            bindFunc(cast(void**)&dCreateTriMesh, "dCreateTriMesh");
            bindFunc(cast(void**)&dGeomTriMeshSetData, "dGeomTriMeshSetData");
            bindFunc(cast(void**)&dGeomTriMeshGetData, "dGeomTriMeshGetData");
            bindFunc(cast(void**)&dGeomTriMeshEnableTC, "dGeomTriMeshEnableTC");
            bindFunc(cast(void**)&dGeomTriMeshIsTCEnabled, "dGeomTriMeshIsTCEnabled");
            bindFunc(cast(void**)&dGeomTriMeshClearTCCache, "dGeomTriMeshClearTCCache");
            bindFunc(cast(void**)&dGeomTriMeshGetTriMeshDataID, "dGeomTriMeshGetTriMeshDataID");
            bindFunc(cast(void**)&dGeomTriMeshGetTriangle, "dGeomTriMeshGetTriangle");
            bindFunc(cast(void**)&dGeomTriMeshGetPoint, "dGeomTriMeshGetPoint");
            bindFunc(cast(void**)&dGeomTriMeshGetTriangleCount, "dGeomTriMeshGetTriangleCount");
            bindFunc(cast(void**)&dGeomTriMeshDataUpdate, "dGeomTriMeshDataUpdate");

            // error.h
            bindFunc(cast(void**)&dSetErrorHandler, "dSetErrorHandler");
            bindFunc(cast(void**)&dSetDebugHandler, "dSetDebugHandler");
            bindFunc(cast(void**)&dSetMessageHandler, "dSetMessageHandler");
            bindFunc(cast(void**)&dGetErrorHandler, "dGetErrorHandler");
            bindFunc(cast(void**)&dGetDebugHandler, "dGetDebugHandler");
            bindFunc(cast(void**)&dGetMessageHandler, "dGetMessageHandler");
            bindFunc(cast(void**)&dError, "dError");
            bindFunc(cast(void**)&dDebug, "dDebug");
            bindFunc(cast(void**)&dMessage, "dMessage");

            // export-dif.h - used to not load, loads fine now as it was made extern "C"
            bindFunc(cast(void**)&dWorldExportDIF, "dWorldExportDIF");

            // mass.h
            bindFunc(cast(void**)&dMassCheck, "dMassCheck");
            bindFunc(cast(void**)&dMassSetZero, "dMassSetZero");
            bindFunc(cast(void**)&dMassSetParameters, "dMassSetParameters");
            bindFunc(cast(void**)&dMassSetSphere, "dMassSetSphere");
            bindFunc(cast(void**)&dMassSetSphereTotal, "dMassSetSphereTotal");
            bindFunc(cast(void**)&dMassSetCapsule, "dMassSetCapsule");
            bindFunc(cast(void**)&dMassSetCapsuleTotal, "dMassSetCapsuleTotal");
            bindFunc(cast(void**)&dMassSetCylinder, "dMassSetCylinder");
            bindFunc(cast(void**)&dMassSetCylinderTotal, "dMassSetCylinderTotal");
            bindFunc(cast(void**)&dMassSetBox, "dMassSetBox");
            bindFunc(cast(void**)&dMassSetBoxTotal, "dMassSetBoxTotal");
            bindFunc(cast(void**)&dMassSetTrimesh, "dMassSetTrimesh");
            bindFunc(cast(void**)&dMassSetTrimeshTotal, "dMassSetTrimeshTotal");
            bindFunc(cast(void**)&dMassAdjust, "dMassAdjust");
            bindFunc(cast(void**)&dMassTranslate, "dMassTranslate");
            bindFunc(cast(void**)&dMassRotate, "dMassRotate");
            bindFunc(cast(void**)&dMassAdd, "dMassAdd");

            // matrix.h
            bindFunc(cast(void**)&dSetZero, "dSetZero");
            bindFunc(cast(void**)&dSetValue, "dSetValue");
            bindFunc(cast(void**)&dDot, "dDot");
            bindFunc(cast(void**)&dMultiply0, "dMultiply0");
            bindFunc(cast(void**)&dMultiply1, "dMultiply1");
            bindFunc(cast(void**)&dMultiply2, "dMultiply2");
            bindFunc(cast(void**)&dFactorCholesky, "dFactorCholesky");
            bindFunc(cast(void**)&dSolveCholesky, "dSolveCholesky");
            bindFunc(cast(void**)&dInvertPDMatrix, "dInvertPDMatrix");
            bindFunc(cast(void**)&dIsPositiveDefinite, "dIsPositiveDefinite");
            bindFunc(cast(void**)&dFactorLDLT, "dFactorLDLT");
            bindFunc(cast(void**)&dSolveL1, "dSolveL1");
            bindFunc(cast(void**)&dSolveL1T, "dSolveL1T");
            bindFunc(cast(void**)&dVectorScale, "dVectorScale");
            bindFunc(cast(void**)&dSolveLDLT, "dSolveLDLT");
            bindFunc(cast(void**)&dLDLTAddTL, "dLDLTAddTL");
            bindFunc(cast(void**)&dLDLTRemove, "dLDLTRemove");
            bindFunc(cast(void**)&dRemoveRowCol, "dRemoveRowCol");

            // memory.h
            bindFunc(cast(void**)&dSetAllocHandler, "dSetAllocHandler");
            bindFunc(cast(void**)&dSetReallocHandler, "dSetReallocHandler");
            bindFunc(cast(void**)&dSetFreeHandler, "dSetFreeHandler");
            bindFunc(cast(void**)&dGetAllocHandler, "dGetAllocHandler");
            bindFunc(cast(void**)&dGetReallocHandler, "dGetReallocHandler");
            bindFunc(cast(void**)&dGetFreeHandler, "dGetFreeHandler");
            bindFunc(cast(void**)&dAlloc, "dAlloc");
            bindFunc(cast(void**)&dRealloc, "dRealloc");
            bindFunc(cast(void**)&dFree, "dFree");

            // misc.h
            bindFunc(cast(void**)&dTestRand, "dTestRand");
            bindFunc(cast(void**)&dRand, "dRand");
            bindFunc(cast(void**)&dRandGetSeed, "dRandGetSeed");
            bindFunc(cast(void**)&dRandSetSeed, "dRandSetSeed");
            bindFunc(cast(void**)&dRandInt, "dRandInt");
            bindFunc(cast(void**)&dRandReal, "dRandReal");
            bindFunc(cast(void**)&dPrintMatrix, "dPrintMatrix");
            bindFunc(cast(void**)&dMakeRandomVector, "dMakeRandomVector");
            bindFunc(cast(void**)&dMakeRandomMatrix, "dMakeRandomMatrix");
            bindFunc(cast(void**)&dClearUpperTriangle, "dClearUpperTriangle");
            bindFunc(cast(void**)&dMaxDifference, "dMaxDifference");
            bindFunc(cast(void**)&dMaxDifferenceLowerTriangle, "dMaxDifferenceLowerTriangle");

            // objects.h
            bindFunc(cast(void**)&dWorldCreate, "dWorldCreate");
            bindFunc(cast(void**)&dWorldDestroy, "dWorldDestroy");
            bindFunc(cast(void**)&dWorldSetGravity, "dWorldSetGravity");
            bindFunc(cast(void**)&dWorldGetGravity, "dWorldGetGravity");
            bindFunc(cast(void**)&dWorldSetERP, "dWorldSetERP");
            bindFunc(cast(void**)&dWorldGetERP, "dWorldGetERP");
            bindFunc(cast(void**)&dWorldSetCFM, "dWorldSetCFM");
            bindFunc(cast(void**)&dWorldGetCFM, "dWorldGetCFM");
            bindFunc(cast(void**)&dWorldUseSharedWorkingMemory, "dWorldUseSharedWorkingMemory");
            bindFunc(cast(void**)&dWorldCleanupWorkingMemory, "dWorldCleanupWorkingMemory");
            bindFunc(cast(void**)&dWorldSetStepMemoryReservationPolicy, "dWorldSetStepMemoryReservationPolicy");
            bindFunc(cast(void**)&dWorldSetStepMemoryManager, "dWorldSetStepMemoryManager");
            bindFunc(cast(void**)&dWorldStep, "dWorldStep");
            bindFunc(cast(void**)&dWorldImpulseToForce, "dWorldImpulseToForce");
            bindFunc(cast(void**)&dWorldQuickStep, "dWorldQuickStep");
            bindFunc(cast(void**)&dWorldSetQuickStepNumIterations, "dWorldSetQuickStepNumIterations");
            bindFunc(cast(void**)&dWorldGetQuickStepNumIterations, "dWorldGetQuickStepNumIterations");
            bindFunc(cast(void**)&dWorldSetQuickStepW, "dWorldSetQuickStepW");
            bindFunc(cast(void**)&dWorldGetQuickStepW, "dWorldGetQuickStepW");
            bindFunc(cast(void**)&dWorldSetContactMaxCorrectingVel, "dWorldSetContactMaxCorrectingVel");
            bindFunc(cast(void**)&dWorldGetContactMaxCorrectingVel, "dWorldGetContactMaxCorrectingVel");
            bindFunc(cast(void**)&dWorldSetContactSurfaceLayer, "dWorldSetContactSurfaceLayer");
            bindFunc(cast(void**)&dWorldGetContactSurfaceLayer, "dWorldGetContactSurfaceLayer");
            bindFunc(cast(void**)&dWorldGetAutoDisableLinearThreshold, "dWorldGetAutoDisableLinearThreshold");
            bindFunc(cast(void**)&dWorldSetAutoDisableLinearThreshold, "dWorldSetAutoDisableLinearThreshold");
            bindFunc(cast(void**)&dWorldGetAutoDisableAngularThreshold, "dWorldGetAutoDisableAngularThreshold");
            bindFunc(cast(void**)&dWorldSetAutoDisableAngularThreshold, "dWorldSetAutoDisableAngularThreshold");
            bindFunc(cast(void**)&dWorldGetAutoDisableAverageSamplesCount, "dWorldGetAutoDisableAverageSamplesCount");
            bindFunc(cast(void**)&dWorldSetAutoDisableAverageSamplesCount, "dWorldSetAutoDisableAverageSamplesCount");
            bindFunc(cast(void**)&dWorldGetAutoDisableSteps, "dWorldGetAutoDisableSteps");
            bindFunc(cast(void**)&dWorldSetAutoDisableSteps, "dWorldSetAutoDisableSteps");
            bindFunc(cast(void**)&dWorldGetAutoDisableTime, "dWorldGetAutoDisableTime");
            bindFunc(cast(void**)&dWorldSetAutoDisableTime, "dWorldSetAutoDisableTime");
            bindFunc(cast(void**)&dWorldGetAutoDisableFlag, "dWorldGetAutoDisableFlag");
            bindFunc(cast(void**)&dWorldSetAutoDisableFlag, "dWorldSetAutoDisableFlag");
            bindFunc(cast(void**)&dWorldGetLinearDampingThreshold, "dWorldGetLinearDampingThreshold");
            bindFunc(cast(void**)&dWorldSetLinearDampingThreshold, "dWorldSetLinearDampingThreshold");
            bindFunc(cast(void**)&dWorldGetAngularDampingThreshold, "dWorldGetAngularDampingThreshold");
            bindFunc(cast(void**)&dWorldSetAngularDampingThreshold, "dWorldSetAngularDampingThreshold");
            bindFunc(cast(void**)&dWorldGetLinearDamping, "dWorldGetLinearDamping");
            bindFunc(cast(void**)&dWorldSetLinearDamping, "dWorldSetLinearDamping");
            bindFunc(cast(void**)&dWorldGetAngularDamping, "dWorldGetAngularDamping");
            bindFunc(cast(void**)&dWorldSetAngularDamping, "dWorldSetAngularDamping");
            bindFunc(cast(void**)&dWorldSetDamping, "dWorldSetDamping");
            bindFunc(cast(void**)&dWorldGetMaxAngularSpeed, "dWorldGetMaxAngularSpeed");
            bindFunc(cast(void**)&dWorldSetMaxAngularSpeed, "dWorldSetMaxAngularSpeed");
            bindFunc(cast(void**)&dBodyGetAutoDisableLinearThreshold, "dBodyGetAutoDisableLinearThreshold");
            bindFunc(cast(void**)&dBodySetAutoDisableLinearThreshold, "dBodySetAutoDisableLinearThreshold");
            bindFunc(cast(void**)&dBodyGetAutoDisableAngularThreshold, "dBodyGetAutoDisableAngularThreshold");
            bindFunc(cast(void**)&dBodySetAutoDisableAngularThreshold, "dBodySetAutoDisableAngularThreshold");
            bindFunc(cast(void**)&dBodyGetAutoDisableAverageSamplesCount, "dBodyGetAutoDisableAverageSamplesCount");
            bindFunc(cast(void**)&dBodySetAutoDisableAverageSamplesCount, "dBodySetAutoDisableAverageSamplesCount");
            bindFunc(cast(void**)&dBodyGetAutoDisableSteps, "dBodyGetAutoDisableSteps");
            bindFunc(cast(void**)&dBodySetAutoDisableSteps, "dBodySetAutoDisableSteps");
            bindFunc(cast(void**)&dBodyGetAutoDisableTime, "dBodyGetAutoDisableTime");
            bindFunc(cast(void**)&dBodySetAutoDisableTime, "dBodySetAutoDisableTime");
            bindFunc(cast(void**)&dBodyGetAutoDisableFlag, "dBodyGetAutoDisableFlag");
            bindFunc(cast(void**)&dBodySetAutoDisableFlag, "dBodySetAutoDisableFlag");
            bindFunc(cast(void**)&dBodySetAutoDisableDefaults, "dBodySetAutoDisableDefaults");
            bindFunc(cast(void**)&dBodyGetWorld, "dBodyGetWorld");
            bindFunc(cast(void**)&dBodyCreate, "dBodyCreate");
            bindFunc(cast(void**)&dBodyDestroy, "dBodyDestroy");
            bindFunc(cast(void**)&dBodySetData, "dBodySetData");
            bindFunc(cast(void**)&dBodyGetData, "dBodyGetData");
            bindFunc(cast(void**)&dBodySetPosition, "dBodySetPosition");
            bindFunc(cast(void**)&dBodySetRotation, "dBodySetRotation");
            bindFunc(cast(void**)&dBodySetQuaternion, "dBodySetQuaternion");
            bindFunc(cast(void**)&dBodySetLinearVel, "dBodySetLinearVel");
            bindFunc(cast(void**)&dBodySetAngularVel, "dBodySetAngularVel");
            bindFunc(cast(void**)&dBodyGetPosition, "dBodyGetPosition");
            bindFunc(cast(void**)&dBodyCopyPosition, "dBodyCopyPosition");
            bindFunc(cast(void**)&dBodyGetRotation, "dBodyGetRotation");
            bindFunc(cast(void**)&dBodyCopyRotation, "dBodyCopyRotation");
            bindFunc(cast(void**)&dBodyGetQuaternion, "dBodyGetQuaternion");
            bindFunc(cast(void**)&dBodyCopyQuaternion, "dBodyCopyQuaternion");
            bindFunc(cast(void**)&dBodyGetLinearVel, "dBodyGetLinearVel");
            bindFunc(cast(void**)&dBodyGetAngularVel, "dBodyGetAngularVel");
            bindFunc(cast(void**)&dBodySetMass, "dBodySetMass");
            bindFunc(cast(void**)&dBodyGetMass, "dBodyGetMass");
            bindFunc(cast(void**)&dBodyAddForce, "dBodyAddForce");
            bindFunc(cast(void**)&dBodyAddTorque, "dBodyAddTorque");
            bindFunc(cast(void**)&dBodyAddRelForce, "dBodyAddRelForce");
            bindFunc(cast(void**)&dBodyAddRelTorque, "dBodyAddRelTorque");
            bindFunc(cast(void**)&dBodyAddForceAtPos, "dBodyAddForceAtPos");
            bindFunc(cast(void**)&dBodyAddForceAtRelPos, "dBodyAddForceAtRelPos");
            bindFunc(cast(void**)&dBodyAddRelForceAtPos, "dBodyAddRelForceAtPos");
            bindFunc(cast(void**)&dBodyAddRelForceAtRelPos, "dBodyAddRelForceAtRelPos");
            bindFunc(cast(void**)&dBodyGetForce, "dBodyGetForce");
            bindFunc(cast(void**)&dBodyGetTorque, "dBodyGetTorque");
            bindFunc(cast(void**)&dBodySetForce, "dBodySetForce");
            bindFunc(cast(void**)&dBodySetTorque, "dBodySetTorque");
            bindFunc(cast(void**)&dBodyGetRelPointPos, "dBodyGetRelPointPos");
            bindFunc(cast(void**)&dBodyGetRelPointVel, "dBodyGetRelPointVel");
            bindFunc(cast(void**)&dBodyGetPointVel, "dBodyGetPointVel");
            bindFunc(cast(void**)&dBodyGetPosRelPoint, "dBodyGetPosRelPoint");
            bindFunc(cast(void**)&dBodyVectorToWorld, "dBodyVectorToWorld");
            bindFunc(cast(void**)&dBodyVectorFromWorld, "dBodyVectorFromWorld");
            bindFunc(cast(void**)&dBodySetFiniteRotationMode, "dBodySetFiniteRotationMode");
            bindFunc(cast(void**)&dBodySetFiniteRotationAxis, "dBodySetFiniteRotationAxis");
            bindFunc(cast(void**)&dBodyGetFiniteRotationMode, "dBodyGetFiniteRotationMode");
            bindFunc(cast(void**)&dBodyGetFiniteRotationAxis, "dBodyGetFiniteRotationAxis");
            bindFunc(cast(void**)&dBodyGetNumJoints, "dBodyGetNumJoints");
            bindFunc(cast(void**)&dBodyGetJoint, "dBodyGetJoint");
            bindFunc(cast(void**)&dBodySetDynamic, "dBodySetDynamic");
            bindFunc(cast(void**)&dBodySetKinematic, "dBodySetKinematic");
            bindFunc(cast(void**)&dBodyIsKinematic, "dBodyIsKinematic");
            bindFunc(cast(void**)&dBodyEnable, "dBodyEnable");
            bindFunc(cast(void**)&dBodyDisable, "dBodyDisable");
            bindFunc(cast(void**)&dBodyIsEnabled, "dBodyIsEnabled");
            bindFunc(cast(void**)&dBodySetGravityMode, "dBodySetGravityMode");
            bindFunc(cast(void**)&dBodyGetGravityMode, "dBodyGetGravityMode");
            bindFunc(cast(void**)&dBodySetMovedCallback, "dBodySetMovedCallback");
            bindFunc(cast(void**)&dBodyGetFirstGeom, "dBodyGetFirstGeom");
            bindFunc(cast(void**)&dBodyGetNextGeom, "dBodyGetNextGeom");
            bindFunc(cast(void**)&dBodySetDampingDefaults, "dBodySetDampingDefaults");
            bindFunc(cast(void**)&dBodyGetLinearDamping, "dBodyGetLinearDamping");
            bindFunc(cast(void**)&dBodySetLinearDamping, "dBodySetLinearDamping");
            bindFunc(cast(void**)&dBodyGetAngularDamping, "dBodyGetAngularDamping");
            bindFunc(cast(void**)&dBodySetAngularDamping, "dBodySetAngularDamping");
            bindFunc(cast(void**)&dBodySetDamping, "dBodySetDamping");
            bindFunc(cast(void**)&dBodyGetLinearDampingThreshold, "dBodyGetLinearDampingThreshold");
            bindFunc(cast(void**)&dBodySetLinearDampingThreshold, "dBodySetLinearDampingThreshold");
            bindFunc(cast(void**)&dBodyGetAngularDampingThreshold, "dBodyGetAngularDampingThreshold");
            bindFunc(cast(void**)&dBodySetAngularDampingThreshold, "dBodySetAngularDampingThreshold");
            bindFunc(cast(void**)&dBodyGetMaxAngularSpeed, "dBodyGetMaxAngularSpeed");
            bindFunc(cast(void**)&dBodySetMaxAngularSpeed, "dBodySetMaxAngularSpeed");
            bindFunc(cast(void**)&dBodyGetGyroscopicMode, "dBodyGetGyroscopicMode");
            bindFunc(cast(void**)&dBodySetGyroscopicMode, "dBodySetGyroscopicMode");
            bindFunc(cast(void**)&dJointCreateBall, "dJointCreateBall");
            bindFunc(cast(void**)&dJointCreateHinge, "dJointCreateHinge");
            bindFunc(cast(void**)&dJointCreateSlider, "dJointCreateSlider");
            bindFunc(cast(void**)&dJointCreateContact, "dJointCreateContact");
            bindFunc(cast(void**)&dJointCreateHinge2, "dJointCreateHinge2");
            bindFunc(cast(void**)&dJointCreateUniversal, "dJointCreateUniversal");
            bindFunc(cast(void**)&dJointCreatePR, "dJointCreatePR");
            bindFunc(cast(void**)&dJointCreatePU, "dJointCreatePU");
            bindFunc(cast(void**)&dJointCreatePiston, "dJointCreatePiston");
            bindFunc(cast(void**)&dJointCreateFixed, "dJointCreateFixed");
            bindFunc(cast(void**)&dJointCreateNull, "dJointCreateNull");
            bindFunc(cast(void**)&dJointCreateAMotor, "dJointCreateAMotor");
            bindFunc(cast(void**)&dJointCreateLMotor, "dJointCreateLMotor");
            bindFunc(cast(void**)&dJointCreatePlane2D, "dJointCreatePlane2D");
            bindFunc(cast(void**)&dJointDestroy, "dJointDestroy");
            bindFunc(cast(void**)&dJointGroupCreate, "dJointGroupCreate");
            bindFunc(cast(void**)&dJointGroupDestroy, "dJointGroupDestroy");
            bindFunc(cast(void**)&dJointGroupEmpty, "dJointGroupEmpty");
            bindFunc(cast(void**)&dJointGetNumBodies, "dJointGetNumBodies");
            bindFunc(cast(void**)&dJointAttach, "dJointAttach");
            bindFunc(cast(void**)&dJointEnable, "dJointEnable");
            bindFunc(cast(void**)&dJointDisable, "dJointDisable");
            bindFunc(cast(void**)&dJointIsEnabled, "dJointIsEnabled");
            bindFunc(cast(void**)&dJointSetData, "dJointSetData");
            bindFunc(cast(void**)&dJointGetData, "dJointGetData");
            bindFunc(cast(void**)&dJointGetType, "dJointGetType");
            bindFunc(cast(void**)&dJointGetBody, "dJointGetBody");
            bindFunc(cast(void**)&dJointSetFeedback, "dJointSetFeedback");
            bindFunc(cast(void**)&dJointGetFeedback, "dJointGetFeedback");
            bindFunc(cast(void**)&dJointSetBallAnchor, "dJointSetBallAnchor");
            bindFunc(cast(void**)&dJointSetBallAnchor2, "dJointSetBallAnchor2");
            bindFunc(cast(void**)&dJointSetBallParam, "dJointSetBallParam");
            bindFunc(cast(void**)&dJointSetHingeAnchor, "dJointSetHingeAnchor");
            bindFunc(cast(void**)&dJointSetHingeAnchorDelta, "dJointSetHingeAnchorDelta");
            bindFunc(cast(void**)&dJointSetHingeAxis, "dJointSetHingeAxis");
            bindFunc(cast(void**)&dJointSetHingeAxisOffset, "dJointSetHingeAxisOffset");
            bindFunc(cast(void**)&dJointSetHingeParam, "dJointSetHingeParam");
            bindFunc(cast(void**)&dJointAddHingeTorque, "dJointAddHingeTorque");
            bindFunc(cast(void**)&dJointSetSliderAxis, "dJointSetSliderAxis");
            bindFunc(cast(void**)&dJointSetSliderAxisDelta, "dJointSetSliderAxisDelta");
            bindFunc(cast(void**)&dJointSetSliderParam, "dJointSetSliderParam");
            bindFunc(cast(void**)&dJointAddSliderForce, "dJointAddSliderForce");
            bindFunc(cast(void**)&dJointSetHinge2Anchor, "dJointSetHinge2Anchor");
            bindFunc(cast(void**)&dJointSetHinge2Axis1, "dJointSetHinge2Axis1");
            bindFunc(cast(void**)&dJointSetHinge2Axis2, "dJointSetHinge2Axis2");
            bindFunc(cast(void**)&dJointSetHinge2Param, "dJointSetHinge2Param");
            bindFunc(cast(void**)&dJointAddHinge2Torques, "dJointAddHinge2Torques");
            bindFunc(cast(void**)&dJointSetUniversalAnchor, "dJointSetUniversalAnchor");
            bindFunc(cast(void**)&dJointSetUniversalAxis1, "dJointSetUniversalAxis1");
            bindFunc(cast(void**)&dJointSetUniversalAxis1Offset, "dJointSetUniversalAxis1Offset");
            bindFunc(cast(void**)&dJointSetUniversalAxis2, "dJointSetUniversalAxis2");
            bindFunc(cast(void**)&dJointSetUniversalAxis2Offset, "dJointSetUniversalAxis2Offset");
            bindFunc(cast(void**)&dJointSetUniversalParam, "dJointSetUniversalParam");
            bindFunc(cast(void**)&dJointAddUniversalTorques, "dJointAddUniversalTorques");
            bindFunc(cast(void**)&dJointSetPRAnchor, "dJointSetPRAnchor");
            bindFunc(cast(void**)&dJointSetPRAxis1, "dJointSetPRAxis1");
            bindFunc(cast(void**)&dJointSetPRAxis2, "dJointSetPRAxis2");
            bindFunc(cast(void**)&dJointSetPRParam, "dJointSetPRParam");
            bindFunc(cast(void**)&dJointAddPRTorque, "dJointAddPRTorque");
            bindFunc(cast(void**)&dJointSetPUAnchor, "dJointSetPUAnchor");
            bindFunc(cast(void**)&dJointSetPUAnchorOffset, "dJointSetPUAnchorOffset");
            bindFunc(cast(void**)&dJointSetPUAxis1, "dJointSetPUAxis1");
            bindFunc(cast(void**)&dJointSetPUAxis2, "dJointSetPUAxis2");
            bindFunc(cast(void**)&dJointSetPUAxis3, "dJointSetPUAxis3");
            bindFunc(cast(void**)&dJointSetPUAxisP, "dJointSetPUAxisP");
            bindFunc(cast(void**)&dJointSetPUParam, "dJointSetPUParam");
            bindFunc(cast(void**)&dJointSetPistonAnchor, "dJointSetPistonAnchor");
            bindFunc(cast(void**)&dJointSetPistonAnchorOffset, "dJointSetPistonAnchorOffset");
            bindFunc(cast(void**)&dJointSetPistonAxis, "dJointSetPistonAxis");
            bindFunc(cast(void**)&dJointSetPistonParam, "dJointSetPistonParam");
            bindFunc(cast(void**)&dJointAddPistonForce, "dJointAddPistonForce");
            bindFunc(cast(void**)&dJointSetFixed, "dJointSetFixed");
            bindFunc(cast(void**)&dJointSetFixedParam, "dJointSetFixedParam");
            bindFunc(cast(void**)&dJointSetAMotorNumAxes, "dJointSetAMotorNumAxes");
            bindFunc(cast(void**)&dJointSetAMotorAxis, "dJointSetAMotorAxis");
            bindFunc(cast(void**)&dJointSetAMotorAngle, "dJointSetAMotorAngle");
            bindFunc(cast(void**)&dJointSetAMotorParam, "dJointSetAMotorParam");
            bindFunc(cast(void**)&dJointSetAMotorMode, "dJointSetAMotorMode");
            bindFunc(cast(void**)&dJointAddAMotorTorques, "dJointAddAMotorTorques");
            bindFunc(cast(void**)&dJointSetLMotorNumAxes, "dJointSetLMotorNumAxes");
            bindFunc(cast(void**)&dJointSetLMotorAxis, "dJointSetLMotorAxis");
            bindFunc(cast(void**)&dJointSetLMotorParam, "dJointSetLMotorParam");
            bindFunc(cast(void**)&dJointSetPlane2DXParam, "dJointSetPlane2DXParam");
            bindFunc(cast(void**)&dJointSetPlane2DYParam, "dJointSetPlane2DYParam");
            bindFunc(cast(void**)&dJointSetPlane2DAngleParam, "dJointSetPlane2DAngleParam");
            bindFunc(cast(void**)&dJointGetBallAnchor, "dJointGetBallAnchor");
            bindFunc(cast(void**)&dJointGetBallAnchor2, "dJointGetBallAnchor2");
            bindFunc(cast(void**)&dJointGetBallParam, "dJointGetBallParam");
            bindFunc(cast(void**)&dJointGetHingeAnchor, "dJointGetHingeAnchor");
            bindFunc(cast(void**)&dJointGetHingeAnchor2, "dJointGetHingeAnchor2");
            bindFunc(cast(void**)&dJointGetHingeAxis, "dJointGetHingeAxis");
            bindFunc(cast(void**)&dJointGetHingeParam, "dJointGetHingeParam");
            bindFunc(cast(void**)&dJointGetHingeAngle, "dJointGetHingeAngle");
            bindFunc(cast(void**)&dJointGetHingeAngleRate, "dJointGetHingeAngleRate");
            bindFunc(cast(void**)&dJointGetSliderPosition, "dJointGetSliderPosition");
            bindFunc(cast(void**)&dJointGetSliderPositionRate, "dJointGetSliderPositionRate");
            bindFunc(cast(void**)&dJointGetSliderAxis, "dJointGetSliderAxis");
            bindFunc(cast(void**)&dJointGetSliderParam, "dJointGetSliderParam");
            bindFunc(cast(void**)&dJointGetHinge2Anchor, "dJointGetHinge2Anchor");
            bindFunc(cast(void**)&dJointGetHinge2Anchor2, "dJointGetHinge2Anchor2");
            bindFunc(cast(void**)&dJointGetHinge2Axis1, "dJointGetHinge2Axis1");
            bindFunc(cast(void**)&dJointGetHinge2Axis2, "dJointGetHinge2Axis2");
            bindFunc(cast(void**)&dJointGetHinge2Param, "dJointGetHinge2Param");
            bindFunc(cast(void**)&dJointGetHinge2Angle1, "dJointGetHinge2Angle1");
            bindFunc(cast(void**)&dJointGetHinge2Angle1Rate, "dJointGetHinge2Angle1Rate");
            bindFunc(cast(void**)&dJointGetHinge2Angle2Rate, "dJointGetHinge2Angle2Rate");
            bindFunc(cast(void**)&dJointGetUniversalAnchor, "dJointGetUniversalAnchor");
            bindFunc(cast(void**)&dJointGetUniversalAnchor2, "dJointGetUniversalAnchor2");
            bindFunc(cast(void**)&dJointGetUniversalAxis1, "dJointGetUniversalAxis1");
            bindFunc(cast(void**)&dJointGetUniversalAxis2, "dJointGetUniversalAxis2");
            bindFunc(cast(void**)&dJointGetUniversalParam, "dJointGetUniversalParam");
            bindFunc(cast(void**)&dJointGetUniversalAngles, "dJointGetUniversalAngles");
            bindFunc(cast(void**)&dJointGetUniversalAngle1, "dJointGetUniversalAngle1");
            bindFunc(cast(void**)&dJointGetUniversalAngle2, "dJointGetUniversalAngle2");
            bindFunc(cast(void**)&dJointGetUniversalAngle1Rate, "dJointGetUniversalAngle1Rate");
            bindFunc(cast(void**)&dJointGetUniversalAngle2Rate, "dJointGetUniversalAngle2Rate");
            bindFunc(cast(void**)&dJointGetPRAnchor, "dJointGetPRAnchor");
            bindFunc(cast(void**)&dJointGetPRPosition, "dJointGetPRPosition");
            bindFunc(cast(void**)&dJointGetPRPositionRate, "dJointGetPRPositionRate");
            bindFunc(cast(void**)&dJointGetPRAngle, "dJointGetPRAngle");
            bindFunc(cast(void**)&dJointGetPRAngleRate, "dJointGetPRAngleRate");
            bindFunc(cast(void**)&dJointGetPRAxis1, "dJointGetPRAxis1");
            bindFunc(cast(void**)&dJointGetPRAxis2, "dJointGetPRAxis2");
            bindFunc(cast(void**)&dJointGetPRParam, "dJointGetPRParam");
            bindFunc(cast(void**)&dJointGetPUAnchor, "dJointGetPUAnchor");
            bindFunc(cast(void**)&dJointGetPUPosition, "dJointGetPUPosition");
            bindFunc(cast(void**)&dJointGetPUPositionRate, "dJointGetPUPositionRate");
            bindFunc(cast(void**)&dJointGetPUAxis1, "dJointGetPUAxis1");
            bindFunc(cast(void**)&dJointGetPUAxis2, "dJointGetPUAxis2");
            bindFunc(cast(void**)&dJointGetPUAxis3, "dJointGetPUAxis3");
            bindFunc(cast(void**)&dJointGetPUAxisP, "dJointGetPUAxisP");
            bindFunc(cast(void**)&dJointGetPUAngles, "dJointGetPUAngles");
            bindFunc(cast(void**)&dJointGetPUAngle1, "dJointGetPUAngle1");
            bindFunc(cast(void**)&dJointGetPUAngle1Rate, "dJointGetPUAngle1Rate");
            bindFunc(cast(void**)&dJointGetPUAngle2, "dJointGetPUAngle2");
            bindFunc(cast(void**)&dJointGetPUAngle2Rate, "dJointGetPUAngle2Rate");
            bindFunc(cast(void**)&dJointGetPUParam, "dJointGetPUParam");
            bindFunc(cast(void**)&dJointGetPistonPosition, "dJointGetPistonPosition");
            bindFunc(cast(void**)&dJointGetPistonPositionRate, "dJointGetPistonPositionRate");
            bindFunc(cast(void**)&dJointGetPistonAngle, "dJointGetPistonAngle");
            bindFunc(cast(void**)&dJointGetPistonAngleRate, "dJointGetPistonAngleRate");
            bindFunc(cast(void**)&dJointGetPistonAnchor, "dJointGetPistonAnchor");
            bindFunc(cast(void**)&dJointGetPistonAnchor2, "dJointGetPistonAnchor2");
            bindFunc(cast(void**)&dJointGetPistonAxis, "dJointGetPistonAxis");
            bindFunc(cast(void**)&dJointGetPistonParam, "dJointGetPistonParam");
            bindFunc(cast(void**)&dJointGetAMotorNumAxes, "dJointGetAMotorNumAxes");
            bindFunc(cast(void**)&dJointGetAMotorAxis, "dJointGetAMotorAxis");
            bindFunc(cast(void**)&dJointGetAMotorAxisRel, "dJointGetAMotorAxisRel");
            bindFunc(cast(void**)&dJointGetAMotorAngle, "dJointGetAMotorAngle");
            bindFunc(cast(void**)&dJointGetAMotorAngleRate, "dJointGetAMotorAngleRate");
            bindFunc(cast(void**)&dJointGetAMotorParam, "dJointGetAMotorParam");
            bindFunc(cast(void**)&dJointGetAMotorMode, "dJointGetAMotorMode");
            bindFunc(cast(void**)&dJointGetLMotorNumAxes, "dJointGetLMotorNumAxes");
            bindFunc(cast(void**)&dJointGetLMotorAxis, "dJointGetLMotorAxis");
            bindFunc(cast(void**)&dJointGetLMotorParam, "dJointGetLMotorParam");
            bindFunc(cast(void**)&dJointGetFixedParam, "dJointGetFixedParam");
            bindFunc(cast(void**)&dConnectingJoint, "dConnectingJoint");
            bindFunc(cast(void**)&dConnectingJointList, "dConnectingJointList");
            bindFunc(cast(void**)&dAreConnected, "dAreConnected");
            bindFunc(cast(void**)&dAreConnectedExcluding, "dAreConnectedExcluding");

            // odeinit.h
            bindFunc(cast(void**)&dInitODE, "dInitODE");
            bindFunc(cast(void**)&dInitODE2, "dInitODE2");
            bindFunc(cast(void**)&dAllocateODEDataForThread, "dAllocateODEDataForThread");
            bindFunc(cast(void**)&dCleanupODEAllDataForThread, "dCleanupODEAllDataForThread");
            bindFunc(cast(void**)&dCloseODE, "dCloseODE");

            // odemath.h
            bindFunc(cast(void**)&dSafeNormalize3, "dSafeNormalize3");
            bindFunc(cast(void**)&dSafeNormalize4, "dSafeNormalize4");
            bindFunc(cast(void**)&dNormalize3, "dNormalize3");
            bindFunc(cast(void**)&dNormalize4, "dNormalize4");
            bindFunc(cast(void**)&dPlaneSpace, "dPlaneSpace");
            bindFunc(cast(void**)&dOrthogonalizeR, "dOrthogonalizeR");

            // rotation.h
            bindFunc(cast(void**)&dRSetIdentity, "dRSetIdentity");
            bindFunc(cast(void**)&dRFromAxisAndAngle, "dRFromAxisAndAngle");
            bindFunc(cast(void**)&dRFromEulerAngles, "dRFromEulerAngles");
            bindFunc(cast(void**)&dRFrom2Axes, "dRFrom2Axes");
            bindFunc(cast(void**)&dRFromZAxis, "dRFromZAxis");
            bindFunc(cast(void**)&dQSetIdentity, "dQSetIdentity");
            bindFunc(cast(void**)&dQFromAxisAndAngle, "dQFromAxisAndAngle");
            bindFunc(cast(void**)&dQMultiply0, "dQMultiply0");
            bindFunc(cast(void**)&dQMultiply1, "dQMultiply1");
            bindFunc(cast(void**)&dQMultiply2, "dQMultiply2");
            bindFunc(cast(void**)&dQMultiply3, "dQMultiply3");
            bindFunc(cast(void**)&dRfromQ, "dRfromQ");
            bindFunc(cast(void**)&dQfromR, "dQfromR");
            bindFunc(cast(void**)&dDQfromW, "dDQfromW");

            // timer.h
            bindFunc(cast(void**)&dStopwatchReset, "dStopwatchReset");
            bindFunc(cast(void**)&dStopwatchStart, "dStopwatchStart");
            bindFunc(cast(void**)&dStopwatchStop, "dStopwatchStop");
            bindFunc(cast(void**)&dStopwatchTime, "dStopwatchTime");
            bindFunc(cast(void**)&dTimerStart, "dTimerStart");
            bindFunc(cast(void**)&dTimerNow, "dTimerNow");
            bindFunc(cast(void**)&dTimerEnd, "dTimerEnd");
            bindFunc(cast(void**)&dTimerReport, "dTimerReport");
            bindFunc(cast(void**)&dTimerTicksPerSecond, "dTimerTicksPerSecond");
            bindFunc(cast(void**)&dTimerResolution, "dTimerResolution");
        }
    }
    public
    {
        this()
        {
            super(libNames);
        }
    }
}

__gshared DerelictODELoader DerelictODE;

shared static this()
{
    DerelictODE = new DerelictODELoader();
}

shared static ~this()
{
    DerelictODE.unload();
}
